﻿using Autofac.Extras.DynamicProxy;
using Scheduler.Common.AOP;
using Scheduler.IServices;
using Scheduler.Model.ViewModels;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Scheduler.Services
{
    //[Intercept(typeof(LogAOP))]
    [Logging]
    public class Test2 : ITest2
    {

        public string GetTest1()
        {
            //使用装饰器模式
            //Order order = new Order() { Id = 1, Name = "lee", Count = 10, Price = 100.00, Desc = "订单测试" };
            //IOrderProcessor orderprocessor = new OrderProcessorDecorator(new OrderProcessor());
            //orderprocessor.Submit(order);
            //使用代理模式
            //var proxyOrder = new ProxyOrder();
            //proxyOrder.Submit(new Order() { Id = 1, Name = "lee", Count = 10, Price = 100.00, Desc = "订单测试" });
            return "Test1";
        }
        public string GetTest2()
        {
            return "Test2";
        }
    }
}
